/*
* Created by zhangkun on 2017/12/07
*/
define([
  './themes/lang/' + window.YUFP_SYS_CONFIG.language + '/pages/example/template/searchtable.js'
], function (require, exports) {
  exports.ready = function (hashCode, data, cite) {
    var vm = yufp.custom.vue({
      el: '#template_searchtable',
      data: function () {
        var me = this;
        return {
          queryFields: [
            {placeholder: this.$t('searchtable.jsmc'), field: 'title', type: 'input'}
          ],
          height: yufp.frame.size().height - 103 - 92, // 默认103+两行标题36*2
          tableColumns: [
            { label: this.$t('searchtable.bm'), prop: 'id', width: 80 },
            { label: this.$t('searchtable.jsmc'), prop: 'title', sortable: true, resizable: true}
          ]
        };
      },
      methods: {
        search: function (row, event) {
          var params = {
            id: row.id
          };
          this.$refs.mytable1.remoteData(params);
        }
      }
    });
  };
});
